package com.zhengaz.service.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhengaz.common.core.vo.PageVo;
import com.zhengaz.service.blog.dto.BlogArticleDto;
import com.zhengaz.service.blog.dto.BlogArticleQueryDto;
import com.zhengaz.service.blog.entity.BlogArticleEntity;
import com.zhengaz.service.blog.vo.BlogArticleVo;

import java.util.List;

/**
 * @author zhengzg
 * @create 2023-11-26 14:20
 */
public interface BlogArticleService extends IService<BlogArticleEntity> {

    /**
     * 根据类型获取文章
     *
     * @param dto 请求实体
     * @return 文章列表
     */
    PageVo<List<BlogArticleVo>> getBlogArticleList(BlogArticleQueryDto dto);

    /**
     * 获取文章详情
     * @param id id
     * @return 文章详情
     */
    BlogArticleVo getBlogArticleDetail(Integer id);

    /**
     * 保存博客文章
     * @param entity 文章内容
     * @return 存储的文章id
     */
    Integer saveBlogArticle(BlogArticleDto entity);
}
